#ifndef SESSION_H
#define SESSION_H

#include <QString>

class TopModule;
class TaskManager;
class Session
{
public:
    explicit Session(TopModule *top_module, int jobs = 1, bool shuffle = false);
    ~Session();

    static Session *create_session(const QString &plugin_path,
                                   bool shuffle, int jobs = 1);

    static QString error_message();

    int session_step() const
    {
        return __session_step;
    }

    int step() const
    {
        return session_step();
    }

    TopModule *top_moudle() const
    {
        return __top_module;
    }

    void next_step();

    void n();

    void next_n_step(int n);

    void ns(int n);

    void nn(int n);

private:
    static QString __error_message;
    TopModule *__top_module;
    TaskManager *__task_manager;
    int __session_step;
};

#endif // SESSION_H
